<?php

	define("MAINTENANCE_MODE", false);
	if (MAINTENANCE_MODE) {
		if ($_SERVER['REMOTE_ADDR'] != '0000000000000') {
			include_once('maintenance/index.php');
			die();
		}
	}

	define("DEFAULT_ENCODING", 'UTF-8');
	mb_internal_encoding(DEFAULT_ENCODING);


	$adminIPs = array(
		''
	);




	// What is our host right now ?
	define("HOSTNAME", $_SERVER['HTTP_HOST']) ;
	define("MAIN_URL",'http://' . HOSTNAME) ;


	try {
        define('APPLICATION_NAME', 'e-br');
        define('APPLICATION_ENV', 'development');
        define('DEFAULT_THEME', 'polishop');
        define('CONFIG_FILE', 'application.ini');
        define('ZF_VERSION', '1.12.3-minimal');
        define('CLIENT_NAME', 'DEVEL');
        define('ADMIN_MAIL', 'ozgun_a@windowslive.com');
        define('SITE_MAIL', 'info@e-br.org');




    } catch (Exception $e) {
		die($e->getMessage());
	}

	define("THEME_URL", 'themes/'.DEFAULT_THEME);

	define("THEME_ASSETS_URL", 'themes/'.DEFAULT_THEME.'/');
	defined('PROJECT_ROOT_DIR') || define('PROJECT_ROOT_DIR', realpath(dirname(__FILE__) . '/..'));
	defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
    define("PROFILE_PICTURES", 'profilePictures');

	set_include_path(implode(PATH_SEPARATOR, array(
	    PROJECT_ROOT_DIR .'/ZendFramework/'.ZF_VERSION.'/library',
	    //PROJECT_ROOT_DIR . '/library/PEAR',
	    PROJECT_ROOT_DIR . '/library',
	    //get_include_path(),
	)));
    //echo get_include_path();

	/** Zend_Application */
	require_once 'Zend/Application.php';

	try {
		$application = new Zend_Application(
		    APPLICATION_ENV,
		    APPLICATION_PATH . '/configs/'.CONFIG_FILE
		);
	} catch (Exception $e) {
		include_once(PROJECT_ROOT_DIR . '/public/problem/index.php');
		die();

	}

	$application->bootstrap()
	            ->run();
